<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of modefilt1</title>
  <meta name="keywords" content="modefilt1">
  <meta name="description" content="One-dimensional mode filtering.">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../m2html.css">
</head>
<body>
<a name="_top"></a>
<!-- menu.html filters -->
<h1>modefilt1
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>One-dimensional mode filtering.</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="box"><strong>function y = modefilt1( x, s ) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>
<div class="fragment"><pre class="comment"> One-dimensional mode filtering.

 Applies a width s one-dimensional mode filter to vector x. That is each
 element of the output y(j) corresponds to the mode of x(j-r:j+r), where
 r~s/2. At boundary regions, y is calculated on smaller windows, for
 example y(1) is calculated over x(1:1+r).  Note that for this function to
 make sense x should take on only a small number of discrete values
 (running time is actually proportional to number of unique values of x).
 This function is modeled after medfilt1, which is part of Matlab's
 'Signal Processing Toolbox'.

 USAGE
  y = modefilt1( x, s )

 INPUTS
  x   - length n vector
  s   - filter size

 OUTPUTS
  y   - filtered vector x

 EXAMPLE
  x=[0 1 0 0 0 3 0 1 3 1 2 2 0 1]; s=3;
  xmedian = medfilt1( x, s ); % may not be available
  xmode = modefilt1( x, s );
  [x; xmedian; xmode]

 See also MEDFILT1

 Piotr's Computer Vision Matlab Toolbox      Version 2.35
 Copyright 2014 Piotr Dollar.  [pdollar-at-gmail.com]
 Licensed under the Simplified BSD License [see external/bsd.txt]</pre></div>





<!-- Start of Google Analytics Code -->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4884268-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
<!-- end of Google Analytics Code -->

<hr><address>Generated by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" target="_parent">m2html</a></strong> &copy; 2003</address>
</body>
</html>
